<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<script src="https://cdn.kgcaptcha.com/captcha.js?appid=xxx"></script>
<script>
kg.captcha({
    // 绑定元素，验证框显示区域
    bind: "#captchaBox",
    // 验证成功事务处理
    success: function(e) {
        console.log(e);
    },
    // 验证失败事务处理
    failure: function(e) {
        console.log(e);
    },
    // 点击刷新按钮时触发
    refresh: function(e) {
        console.log(e);
    }
});
</script>
<div id="captchaBox">载入中 ...</div>
<body>

</body>
</html>